package com.hxminer.hxwebs.service;

import com.hxminer.hxwebs.model.User;
import com.hxminer.hxwebs.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * Author YRG
 * Created by on 2018/5/7.
 * Describe
 */
@Service
public class UserService {

    @Autowired
    private UserRepository userRepository;

    //    @Transactional
    public void insetMose() {
        User user1 = new User();
        user1.setPassword("123456");
        user1.setUsername("xiaohua");
        userRepository.save(user1);

        User user2 = new User();

        user2.setUsername("xiaomei");
        user2.setPassword("123456");
        userRepository.save(user2);
    }


}
